package com.sky.blog.dao.pojo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sky.blog.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * @author sky  2022/3/23
 * @version 1.0
 */
@Data
@TableName("blog_posts")
@ApiModel(value = "博客帖子")
@EqualsAndHashCode(callSuper = true)
public class Posts extends BaseEntity {
    @TableId(value = "id")
    @ApiModelProperty(name = "帖子ID", example = "123123142312")
    private Long id;

    @ApiModelProperty(name = "置顶", example = "1")
    private Integer isTop;

    @ApiModelProperty(name = "是否设置为热门", example = "1")
    private Integer isHot;

    @ApiModelProperty(name = "发布时间", example = "2020-1-1 12:12:12")
    private LocalDateTime publishTime;

    @ApiModelProperty(name = "标题", example = "JAVA入门")
    private String title;

    @ApiModelProperty(name = "概要", example = "如何学习JAVA")
    private String summary;

    @ApiModelProperty(name = "内容", example = "首先...")
    private String content;

    @ApiModelProperty(name = "查看数", example = "100")
    private Integer viewsCount;

    @ApiModelProperty(name = "评论数", example = "99")
    private Integer commentsCount;

    @ApiModelProperty(name = "分类", example = "['JAVA','Springboot']")
    private String category;

    @ApiModelProperty(name = "封面", example = "xxx.jpg")
    private String banner;


    @ApiModelProperty(name = "编辑器的类型", example = "markdown")
    private int editorType;


}
